package com.zdkj.subway.st.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.zdkj.common.core.exceltools.HeaderToColumn;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.List;

/**
 * @ProjectName: zdkj
 * @Package: com.zdkj.subway.st.entity
 * @ClassName: SwStTicketTest
 * @Description:
 * @Author: kangjian
 * @CreateDate: 2020/1/7 11:01
 * @Version: 1.0
 */

@Data
@TableName("sw_tk_ticket_test")
@ApiModel(value = "车票测试表")
@EqualsAndHashCode(callSuper = true)
public class SwTkTicketTest extends Model<SwTkTicketTest> {

    private static final long serialVersionUID = 1L;

    @TableId(type = IdType.AUTO)
    @ApiModelProperty(value = "唯一标识")
    private Integer id;

    @ApiModelProperty(value = "测试车间")
    @HeaderToColumn(header = "测试车间",index = 1)
    private String testWorkshop;

    @ApiModelProperty(value = "票卡CODE")
    @HeaderToColumn(header = "票卡CODE",index = 1)
    private String ticketType;

    @ApiModelProperty(value = "票卡介质")
    @HeaderToColumn(header = "票卡介质",index = 1)
    private String ticketMedium;

    @ApiModelProperty(value = "测试类型")
    @HeaderToColumn(header = "测试类型",index = 2,colhandlebysql = "SELECT CODE FROM SW_PARAM_LINE WHERE NAME=?")
    private String testType;

    @ApiModelProperty(value = "车票CODE")
    @HeaderToColumn(header = "车票CODE",index = 2)
    private String ticketName;

    @ApiModelProperty(value = "数量")
    private Integer ticketNumber;

    @ApiModelProperty(value = "测试原因")
    @HeaderToColumn(header = "测试原因",index = 3)
    private String testReason;

    @ApiModelProperty(value = "测试结果")
    @HeaderToColumn(header = "测试结果",index = 4)
    private String testResult;

    @ApiModelProperty(value = "测试人")
    private String testPerson;

    @ApiModelProperty(value = "测试人工号")
    private String testPersonId;

    @ApiModelProperty(value = "测试提交人")
    @HeaderToColumn(header = "测试提交人",index = 6)
    private String testSubmiterId;

    @ApiModelProperty(value = "测试提交时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime testSubmitTime;

    @ApiModelProperty(value = "测试时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime testTime;

    @ApiModelProperty(value = "审核状态:0:未提交,1:已提交,2:待审批,3:审批通过,4:审批不通过")
    private String checkStatus;

    @ApiModelProperty(value = "审核人员")
    private String checkPersonId;

    @ApiModelProperty(value = "审核时间")
    private String checkTime;

    @ApiModelProperty(value = "备注")
    @HeaderToColumn(header = "备注",index = 7)
    private String remark;

    @ApiModelProperty(value = "创建人ID")
    private Long creatorId;

    @ApiModelProperty(value = "创建人名称")
    private String creatorName;

    /**
     * 用于前端传开始结束日期
     */
    @TableField(exist = false)
    private List<String> dates1;

    /**
     * 部门ID
     */
    @ApiModelProperty(value = "部门ID")
    private Integer deptId;

    @ApiModelProperty(value = "创建时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime create_time;


    @ApiModelProperty(value = "测试提交时间 yyyy-MM-dd")
    @TableField(exist = false)
    private String testSubmitTimeDTO;

}
